<?php

require_once dirname(__FILE__) . '/../Query.php';

class Rams_TrafficQuery extends RawsQuery
{
  public function __construct($type = null, $year = null, $month = null)
  {
      parent::__construct();
      $this->setType($type);
      $this->setYear($year);
      $this->setMonth($month);
  }

  public function setType($value)
  {
    if ($value !== null) {
        $this->_params['type'] = $value;
    } else {
        unset($this->_params['type']);
    }
    return $this;
  }

  public function setYear($value)
  {
    if ($value !== null) {
        $this->_params['year'] = $value;
    } else {
        unset($this->_params['year']);
    }
    return $this;
  }

  public function setMonth($value)
  {
    if ($value !== null) {
        $this->_params['month'] = $value;
    } else {
        unset($this->_params['month']);
    }
    return $this;
  }

  public function setWeek($value)
  {
    if ($value !== null) {
        $this->_params['week'] = $value;
    } else {
        unset($this->_params['week']);
    }
    return $this;
  }

  public function setDay($value)
  {
    if ($value !== null) {
        $this->_params['day'] = $value;
    } else {
        unset($this->_params['day']);
    }
    return $this;
  }

  public function setHour($value)
  {
    if ($value !== null) {
        $this->_params['hour'] = $value;
    } else {
        unset($this->_params['hour']);
    }
    return $this;
  }
  
  public function getQueryUrl($base_uri, $path)
  {
    return parent::getQueryUrl($base_uri, "traffic", $path);
  }

}
